{% extends "RegardProductsBundle::layout.html.twig" %}

{% block title %}Parfums {{ brandName }} Marseille 4e (Chartreux){% endblock %}

{% block content %}

<div id="PRODUCT">
	<div id="brand_title">
		{{ brandName|upper }}
	</div>
		
    <div>
		<a href="{{ path('regard_list_brand') }}">
			< Retour &agrave; la liste des marques
		</a>
	</div>
	
	{% if is_granted('ROLE_ADMIN') %}
	<br />
		<div>
			<a href="{{ path('regard_products_add', {'brandId':brandId}) }}">Ajouter un produit</a>
		</div>
	{% endif %}
          
	<div id="notice">
		{% for flashMessage in app.session.flashbag.get('notice') %}
			{{ flashMessage }}
		{% endfor %}
	</div>
	<br />
	
    {% for product in productList %}
		<div class="div_product">
			<div class="div_image">
				<img src="{{ asset('img/content/'~product.picture) }}" title="{{ product.name }}" alt="{{ product.name }}"/>
				{# <img src="{{ asset('img/produits/'~product.picture) }}" title="{{ product.name }}" alt="{{ product.name }}"/> #}
			</div>
			<div class="div_product_text">
				<div class="div_title">
					{{product.name}}
					{% if is_granted('ROLE_ADMIN') %}
						<span>
							&nbsp;<a href="{{ path('regard_products_edit', {'productId': product.id}) }}">Modifier</a>
						</span>
						<span>
							&nbsp;&#124;&nbsp;
						</span>
						<span>
							<a href="{{ path('regard_products_delete', {'productId': product.id}) }}">Supprimer</a>
						</span>
					{% endif %}
				</div>
				<div class="div_desciption">
					<p>
						{{ product.description|nl2br }}
					</p>
				</div>
				<div class="news_link">
					<a href="{{ path('regard_contact_index', 
										{'type': 'Produit', 'messageContent': 'J ai une question sur le produit '~product.name~''}) }}">
						&nbsp;> Poser une question sur ce produit
					</a>
				</div>
			</div>
		</div>
    {% endfor %}
	
	<div id="div_facebook">
		<div class="fb-comments facebook-iframe" data-href="http://parfumerieregard.com" data-width="615" data-num-posts="5"></div>
	</div>
</div>

{% endblock %}
